package com.fuluwa.interfaces.category.web.filter;

import com.alibaba.fastjson.serializer.PropertyFilter;
import com.fuluwa.domain.category.model.Category;
import com.fuluwa.domain.category.service.dto.NavDTO;

public class NAVFilter {
	
	public static class NAVPropFileter implements PropertyFilter {
		@Override
		public boolean apply(Object source, String name, Object value) {

			if ((source instanceof Category)
					&& (name.equals("pcid") || name.equals("cid") || name.equals("name") || name.equals("list"))) {
				return true;
			} else if (source instanceof NavDTO) {
				return true;
			}
			return false;
		}
	}

}
